<template>
  <div ref="myDom">生命周期</div>
</template>

<script setup>
import { onMounted, ref } from 'vue';

const myDom = ref(null)

onMounted(() => {
  console.log('挂载完毕', myDom.value);
})
</script>